package com.education.online.service.impl;


import com.education.common.pojo.OResources;
import com.education.common.utils.Convert;
import com.education.online.mapper.OResourcesMapper;
import com.education.online.service.OResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 专业课程体系资源表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:55
 */
@Service
public class OResourcesServiceImpl implements OResourcesService {

    @Autowired
    private OResourcesMapper oResourcesMapper;

    @Override
    public List<OResources> selectOResourcesByIdsAndType(Integer[] ids, Integer type) {
        return oResourcesMapper.selectOResourcesByIdsAndType(ids,type);
    }

    //查询专业课程体系资源表信息
    @Override
    public OResources selectOResourcesById(Integer id) {
        return oResourcesMapper.selectOResourcesById(id);
    }

    // 查询专业课程体系资源表列表
    @Override
    public List<OResources> selectOResourcesList(OResources oResources) {
        return oResourcesMapper.selectOResourcesList(oResources);
    }

    // 新增专业课程体系资源表
    @Override
    public int insertOResources(OResources oResources) {
        return oResourcesMapper.insertOResources(oResources);
    }

    //修改专业课程体系资源表
    @Override
    public int updateOResources(OResources oResources) {
        return oResourcesMapper.updateOResources(oResources);
    }

    //删除专业课程体系资源表对象
    @Override
    public int deleteOResourcesByIds(String ids) {
        return oResourcesMapper.deleteOResourcesByIds(Convert.toStrArray(ids));
    }
}